package sr.myserver.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import sr.myserver.vo.common.Basic;


public class Login {

    @Data
    @ApiModel(value = "用户登录", description = "用户登录请求")
    public static class Request extends Basic.Request {

        @Schema(description = "用户账号")
        private String userId;

        @Schema(description = "登录类型(1-APP登录. 其它-后台管理登录)")
        private String clientType;

        @Schema(description = "用户密码")
        private String passwd;

        @Schema(description = "验证码")
        private String msgVerifyCode;
    }

    @Data
    @ApiModel(value = "用户登录", description = "用户登录响应")
    public static class Response extends Basic.Response {
        /**
         * 登录账号
         */
        @Schema(description = "登录账号")
        private String userId;
        /**
         * 用户姓名
         */
        @Schema(description = "用户姓名")
        private String userName;
        /**
         * token信息
         */
        @Schema(description = "token信息")
        private String token;

        public Response() {
        }

        public Response(String code, String msg, String token) {
            this.token = token;
            this.code = code;
            this.msg = msg;
        }

        public Response(String token) {
            this.token = token;
        }
    }

}
